//
//  DevSettingModel.h
//  RuiHeApp
//
//  Created by Jun on 2022/11/30.
//

#import "BaseModel.h"
#import "TextInputModel.h"
#import "DevSettingOptionModel.h"

NS_ASSUME_NONNULL_BEGIN


@interface DevSettingModel : BaseModel

@property (nonatomic ,copy) NSArray *keys;

@property (nonatomic ,copy) NSDictionary *data;

@property (nonatomic ,copy) NSArray<DevSettingModel *> *dataList;

@property (nonatomic ,copy) NSString *nickname;

//南非交流微网 中PCS下发某些指令时,需要添加相对应的另外一个参数(如:要下发PCS_SysTurnOn --->  {"PCS_SysTurnOn":1,PCS_SysTurnOff:0})
@property (nonatomic ,copy) NSString *other_cmd;

@property (nonatomic ,copy) NSString *content;

@property (nonatomic ,copy) NSString *field;

//日月元-->参数设置-->工作模式  禁用选项
@property (nonatomic ,assign) BOOL disable;

@property (nonatomic ,copy) NSString *comment;

@property (nonatomic ,copy) NSString *command;

@property (nonatomic ,assign) NSInteger minLength;

@property (nonatomic ,assign) NSInteger maxLength;

@property (nonatomic ,assign) BOOL show_frontend;

@property (nonatomic ,copy) NSString *unitLen;

@property (nonatomic ,assign) BOOL unchange;

@property (nonatomic ,assign) BOOL hidden;

//Switch显示开关按钮，number的时候输入数字，select的时候下拉选择list
@property (nonatomic ,copy) NSString *type;

@property (nonatomic ,copy) NSString *format;

//寄存器地址
@property (nonatomic ,assign) NSInteger regAddr;
//位宽
@property (nonatomic ,assign) NSInteger num;
//偏移量
@property (nonatomic ,assign) NSInteger offset;

@property (nonatomic ,copy) NSArray *role;

@property (nonatomic ,copy) NSString *max;

@property (nonatomic ,copy) NSString *min;

@property (nonatomic ,copy) NSString *ratio;

@property (nonatomic ,copy) NSArray<DevSettingOptionModel *> *selectList;

@property (nonatomic ,copy) NSString *unit;

@property (nonatomic ,strong) TextInputModel *inputModel;

@property (nonatomic ,copy) NSArray<DevSettingModel *> *properList;

@property (nonatomic ,strong) id properties;


//切换日月元的工作模式
-(void)changeRYYWorkMode:(NSInteger)workMode;

//切换日月元的(Self Defined Mode)工作模式下的 Machine Model
-(void)changeRYYMachineModel:(NSInteger)MachineModel;

//切换日月元的 光伏能量使用优先级
-(void)changeRYYPvPriority:(NSInteger)index;

//切换日月元的 充电优先级
-(void)changeRYYChargePriority:(NSInteger)index;
//处理日月元工作模式
-(void)handleRYYWorkModeWithDevInfo:(NSDictionary*)dic;

-(void)loadRYYWorkModeDataWithDevInfo:(NSDictionary*)dic;

-(void)loadCumtomDataWithDevInfo:(NSDictionary *)dic;
@end

NS_ASSUME_NONNULL_END
